home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Performance Co-Pilot 1.3
/
SGI Performance Co-Pilot 1.3.iso
/
dist
/
inst.init
< prev
next >
Wrap
Text File
|
1997-03-28
|
2KB
|
55 lines
#!/bin/sh
# This script will be run by inst (or swmgr) when the distribution directory,
# if placed at the top level distribution directory, with the name
# "inst.init". The user is asked if the script should be run, unless
# the resource "startup_script" is set to either "ignore" or "execute",
# to suppress asking the question. Automatic installs (inst -a) fail
# if this resource is not set, and this file is present.
#
# The script has access to the normal environment variables (those that
# can be used by pre-, post-, and exit-ops), such as $mr, $rbase, and
# $dist.
#
# It is invoked with 3 arguments. The first is either "inst" or "swmgr"
# for scripts that want to behave differently. The second is the distribution
# path, and the third is the file descriptor number for communicating
# results/commands back to inst or swmgr.
#
# The script should exit with the value 0 if there are no errors
# if the exit value is non-zero, a warning message is printed.
#
# The normal output of this script and the programs it uses are not paged
# in anyway, nor is the input. Error output (stderr, descriptor 2) is
# paged. If programs are used that use stderr, but you do not want paging
# (such as rm -ri), then run them with stderr directed to normal output
# (rm -ri 2>&1)
distpath="$2"
osrelease=`uname -r`
# For 5.3 release we don't need to do anything
if echo "$osrelease" | grep '^5.3' >/dev/null ; then
exit 0
fi
# For 6.1 release, we don't need to do anything
if echo "$osrelease" | grep '^6.1' >/dev/null ; then
exit 0
fi
# May want to put in some additional checks that the directory
# actually exists, but then you get into some tough issues
# like checking remote distributions without knowing the
# remote account to log into ....
if echo "$osrelease" | grep '^6.2' >/dev/null ; then
newdistpath=`dirname "$distpath"`/dist6.2
echo "from $newdistpath" >&$3
exit 0
fi
echo "Products in $distpath are not supported for IRIX release: $osrelease" >&2
exit 0